package br.ita.escolaita.model.entity;

import java.util.List;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "PROFESSOR")
@NamedQuery(name = "professor.findAll", query = "SELECT p FROM Professor p")
public class Professor extends Funcionario {

    @Transient
    private static final long serialVersionUID = 7002055602551661038L;
    @OneToMany(mappedBy = "professor")
    private List<Disciplina> disciplina;

    // Construtor Default
    public Professor() {
    }

    public List<Disciplina> getDisciplina() {
        return disciplina;
    }

    public void setDisciplina(List<Disciplina> disciplina) {
        this.disciplina = disciplina;
    }
}
 
